import request from '@/utils/request'
/**
 * 查询指定模型
 * @param query
 */
export const queryModelById = (identifier: string) => {
  return request({
    url: '/model/get',
    method: 'get',
    params: { identifier },
  })
}
/**
 * 创建模型
 * @param query
 */
export const createModel = (data: any) => {
  return request({
    url: '/model/create',
    method: 'post',
    data,
  })
}

export const queryModelView = (params: any) => {
  return request({
    url: '/model/getView',
    method: 'get',
    params,
  })
}

export const queryModelList = (params: any) => {
  return request({
    url: '/model/list',
    method: 'get',
    params,
  })
}

export const updateModel = (data: any) => {
  return request({
    url: '/model/modify',
    method: 'post',
    data,
  })
}

export const updateView = (data: any) => {
  return request({
    url: '/model/modifyView',
    method: 'post',
    data,
  })
}

export const createView = (data: any) => {
  return request({
    url: '/model/createView',
    method: 'post',
    data,
  })
}